package com.xbongbong.sys.model.impl;

import com.xbongbong.paas.toolbox.exception.XbbException;
import com.xbongbong.sys.domain.dao.MirrorCompanyDao;
import com.xbongbong.sys.domain.entity.MirrorCompanyEntity;
import com.xbongbong.sys.model.MirrorCompanyModel;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;

/**
 * 公司镜像配置
 * @author xingxing.xiao
 * @date 2019/11/27 15:31
 */
@Service("mirrorCompanyModel")
public class MirrorCompanyModelImpl implements MirrorCompanyModel {

    @Resource
    private MirrorCompanyDao mirrorCompanyDao;

    @Override
    public Integer insert(MirrorCompanyEntity entity) {
        return mirrorCompanyDao.insert(entity);
    }

    @Override
    public Integer update(MirrorCompanyEntity entity) throws XbbException {
        return mirrorCompanyDao.update(entity);
    }

    @Override
    public MirrorCompanyEntity getMirrorCompany(Map<String, Object> param) {
        return mirrorCompanyDao.getMirrorCompany(param);
    }

    /**
     * 查询实体列表
     *
     * @param param 条件
     * @author xingxing.xiao
     * @date 2019/11/25 17:16
     */
    @Override
    public List<MirrorCompanyEntity> findEntitys(Map<String, Object> param) {
        return mirrorCompanyDao.findEntitys(param);
    }

    /**
     * 获取符合查询条件的记录总数
     *
     * @param param 条件
     * @author xingxing.xiao
     * @date 2019/11/25 17:33
     */
    @Override
    public Integer getEntitysCount(Map<String, Object> param) {
        return mirrorCompanyDao.getEntitysCount(param);
    }

    @Override
    public List findEntitysWithoutSub(Map<String, Object> param) {
        return null;
    }
}
